home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
I-Info Magazine
/
(c)i18.d64
/
elvis.sda
/
ELVIS MAIN
(
.txt
)
next >
Wrap
Commodore BASIC
|
2007-02-04
|
1KB
|
53 lines
5 PRINT"[147] SID/POKE WRITTEN BY: TODD BRANDYS"
10 PRINT" BASED PARTIALLY ON SIDPLAYER BY"
15 PRINT" CRAIG CHAIMBERLAIN":PRINT
20 PRINT" THIS PROGRAM PLAYS THE MUSIC FOR:"
25 PRINT" A TRIBUTE TO ELVIS[154]"
30 PRINT:PRINT" LOADING POKE FILE..........."
35 GOTO40000
1000 DIMA$(720):DIMB$(720)
1005 OPEN1,8,2,"ELVIS.POK,S,R"
1006 INPUT#1,C1$
1010 FORR=0TO719
1015 INPUT#1,A$(R)
1020 INPUT#1,B$(R)
1025 NEXTR
1026 CLOSE1
1045 POKE53280,VAL(C1$):POKE53281,VAL(C1$)
1046 PRINT"[147]"
1050 FORR=0TO719
1055 POKE1024+R,VAL(A$(R)):POKE55296+R,VAL(B$(R))
1060 NEXTR
1065 RETURN
40000 DN=8:SA=780:SX=781:SY=782:SP=783
40001 GOSUB1000
40003 PRINT"[158] [195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][159]":PRINT"[145]"
40005 GOSUB57000
40010 F$="ELVIS":LA=PEEK(49)+256*PEEK(50)+1000:GOSUB57500
40015 SYSHK
40020 POKESX,LO:POKESY,HI:SYS PL
40025 K=PEEK(SX)+256*PEEK(SY)
40029 PRINTTAB(4);
40030 IFPEEK(K)THENPRINTCHR$(PEEK(K));:K=K+1:GOTO40029
40035 POKE SS,7
40040 IFPEEK(SS)AND 7 GOTO40040
40045 SYS DP
40050 END
40055 REM
40060 REM
40065 REM
57000 POKESA,1:POKESX,DN:POKESY,1:SYS65466:F$="ELVIS.OBJ":GOSUB59000
57010 POKESA,0:SYS65493:IFPEEK(SP)AND1GOTO59100
57020 SS=49152:HK=49435:PL=49458:DP=49629:RETURN
57100 GOSUB57000:POKESX,LA-256*INT(LA/256):POKE SY,INT(LA/256):SYS 51042
57110 LA=LA+1398:RETURN
57500 POKE SA,1:POKE SX,DN:POKE SY,0:SYS 65466:F$=F$+".MUS":GOSUB 59000
57510 HI=INT(LA/256):LO=LA-256*HI
57520 POKE SA,0:POKE SX,LO:POKESY,HI:SYS 65493:IF PEEK(SP)AND1 GOTO 59100
57530 LA=PEEK(SX)+256*PEEK(SY):RETURN
59000 FORK=1TOLEN(F$):POKE 584+K,ASC(MID$(F$,K)):NEXT
59010 POKE SA,LEN(F$):POKE SX,73:POKE SY,2:SYS 65469:RETURN
59100 P=PEEK(SA):PRINT"ERROR: ";:IFP=4THENPRINT"FILE NOT FOUND":END
59110 IFP=5 THEN PRINT"DEVICE NOT PRESENT":END
59120 PRINTST:END